package cn.aaa.openFeign;

import cn.aaa.pojo.domain.LoginVo;
import cn.aaa.result.JSONResult;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UaaOpenFeignFallbackFactory implements FallbackFactory<UaaOpenFeign> {
    @Override
    public UaaOpenFeign create(Throwable cause) {
        return new UaaOpenFeign() {
            @Override
            public JSONResult register(LoginVo loginVo){
                return JSONResult.error("添加失败");
            }
        };
    }
}
